//输入任意一个多个学员成绩，直到输入负数结束
//1 总分，平均分
//2 不及格 ，及格率
//3 80分以上的

#include <stdio.h>
int main(){
	int count = 0;
	int fail = 0;
	int excellent = 0;
	float num = 0;
	float sum = 0;
	float ave = 0;
	float pass = 0;

	while( num >= 0 && num <= 150){
		printf("输入学员成绩：");
		scanf("%f",&num);
		if(num >= 0 && num <= 150 ){
			sum = sum + num;
			count++;
			if(num > 80){
				excellent = excellent + 1;
			}else if(num < 60){
				fail = fail + 1;
			}
		}
	}
	printf("总分数%.1f\n",sum);
	printf("平均分%.1f\n",sum/count);
	printf("不及格数%d\n",fail);
	printf("及格率%.2f\n",(float)(count-fail)/count);
	printf("大于80分的%d\n",excellent);

	return 0;
}
